<?php
/* User Login interface    */
$app->post('/login',App\controllers\UserController::class . ':login')->add(
  new App\middlewares\CallRecord($app->getContainer(),'登录接口')
);

/* User Init interface  */
$app->get('/init',App\controllers\UserController::class . ':init')->add(
  new App\middlewares\Auth($app->getContainer())
)->add(
  new App\middlewares\CallRecord($app->getContainer(),'用户数据初始化接口')
);

/* Disk Init interface  */
$app->get('/disk/init',App\controllers\DiskController::class . ':init')->add(
  new App\middlewares\Auth($app->getContainer())
)->add(
  new App\middlewares\CallRecord($app->getContainer(),'存储空间数据初始化接口')
);

/* Disk Action interface  */
$app->post('/disk',App\controllers\DiskController::class . ':actions')->add(
  new App\middlewares\Auth($app->getContainer())
)->add(
  new App\middlewares\CallRecord($app->getContainer(),'存储空间操作接口')
);

/* Disk Upload interface */
$app->post('/upload',App\controllers\DiskController::class . ':upload')->add(
  new App\middlewares\CallRecord($app->getContainer(),'上传接口')
);
